<!--
 * @Author: WeiJin 3413105907@qq.com
 * @Date: 2023-12-09 23:56:05
 * @LastEditors: WeiJin 3413105907@qq.com
 * @LastEditTime: 2023-12-15 10:50:13
 * @FilePath: \rpsm-user\src\views\home\Breadcrumb.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item v-for="item in breadcrumbList" :key="item.path">
            <el-link :href="item.path" target="_self" :underline="false" class="el-link">
                {{item.meta.title}}
            </el-link>
        </el-breadcrumb-item>
    </el-breadcrumb>
</template>

<style scoped>
    .el-breadcrumb{
        line-height: 60px;
    }
</style>

<script>
export default {
    name:'Breadcrumb',
    data(){
        return{
            breadcrumbList:[],
        }
    },
    watch:{
        $route(to,from){
             this.breadcrumbList=to.matched
        },
        immediate:true 
    },
   
    mounted () {
        this.breadcrumbList=this.$route.matched
    },
   
}
</script>